<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2trto1tr</title>
    <script src="../js/vue.js">

    </script>
    <style>
        th{
            border:1px solid darkblue;
        }
        tr{
            border:1px solid deepskyblue;
        }
        td{
            border: 1px solid deeppink;
        }
    </style>
</head>
<body>
<div id="app">
    <table class="table table-bordered" width="100%" id="servicesTable">
        <tr>
            <th width="1%"><input type="checkbox" id="checkall"></th>
            <th width="8%">服务图标</th>
            <th width="11%">服务机构帐号</th>
            <th width="18%">服务机构名称</th>
            <th width="8%">联系人</th>
            <th width="9%">审核状态</th>
            <th width="9%">审核时间</th>
            <th width="8%">订购数量</th>
            <th width="8%">服务评分</th>
            <th width="9%">状态</th>
            <th width="11%">状态更新时间</th>
        </tr>
        <template>
            <tr>
                <td rowspan="2">
                    <input type="checkbox" name="checkbox1" :value=" service.id ">
                </td>
                <th rowspan="2">
                    <a target="_blank" :href=" '${fullPath}jiance/' + service.id + '.html' ">
                        <img :src=" '${pageContext.request.contextPath}/' + service.iconUrl1 " height="60px"
                             width="60px"></a>
                </th>
                <td colspan="9">
                    <table width="100%">
                        <tr>
                            <td width="8%">服务名称：</td>
                            <td align="left">
                                <a target="_blank"
                                   :href=" '${pageContext.request.contextPath}/service/service_update.html?id=' + service.id ">
                                    {{service.title}}
                                </a>
                            </td>
                            <td align="right">
                                <button type="button" name="passServiceBtn" :value=" service.id "
                                        class="btn btn-danger btn-xs" @click="passService(service.id)">
                                    审核通过
                                </button>
                                &nbsp;
                                <button type="button" class="btn btn-danger btn-xs" name="nopassServiceBtn"
                                        :value=" service.id " @click="nopassService(service.id)">审核不通过
                                </button>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>

            <tr>
                <td>
                    <a :href=" '${pageContext.request.contextPath}/user/account.html?id=' + service.org_id ">{{service.orgAcountName}}</a>
                </td>
                <td>{{service.org_name_cn}}</td>
                <td>{{service.linkManName}}</td>
                <td v-if="null == service.checkStatus">等待审核</td>
                <td v-else>{{service.checkStatus == 1 ? "审核通过" : "审核不通过"}}</td>


                <td v-if="service.checkTime != null">{{formatDate(service.checkTime)}}</td>
                <td v-else></td>

                <td>{{service.salesVolume}}</td>
                <td>mark</td>
                <td>
                    <span v-if="service.checkStatus == null">等待审核</span>
                    <span v-if="service.checkStatus == 0">审核不通过</span>
                    <span v-if="service.checkStatus == 1">
                                {{service.status == 1 ? '上架(通过)':''}}
                                {{service.status == 2 ? '下架(通过)':''}}
                                {{service.status == 3 ? '冻结(通过)':''}}
                                {{service.status == 4 ? '新发(通过)':''}}
                            </span>
                </td>
                <td>{{formatDate(service.updateTime)}}</td>
            </tr>

        </template>

        <template>
            <tr>
                <td rowspan="2">
                    <input type="checkbox" name="checkbox1" :value=" service.id ">
                </td>
                <th rowspan="2">
                    <a target="_blank" :href=" '${fullPath}jiance/' + service.id + '.html' ">
                        <img :src=" '${pageContext.request.contextPath}/' + service.iconUrl1 " height="60px"
                             width="60px"></a>
                </th>
                <td>
                    <a :href=" '${pageContext.request.contextPath}/user/account.html?id=' + service.org_id ">{{service.orgAcountName}}</a>
                </td>
                <td>{{service.org_name_cn}}</td>
                <td>{{service.linkManName}}</td>
                <td v-if="null == service.checkStatus">等待审核</td>
                <td v-else>{{service.checkStatus == 1 ? "审核通过" : "审核不通过"}}</td>


                <td v-if="service.checkTime != null">{{formatDate(service.checkTime)}}</td>
                <td v-else></td>

                <td>{{service.salesVolume}}</td>
                <td>mark</td>
                <td>
                    <span v-if="service.checkStatus == null">等待审核</span>
                    <span v-if="service.checkStatus == 0">审核不通过</span>
                    <span v-if="service.checkStatus == 1">
                                {{service.status == 1 ? '上架(通过)':''}}
                                {{service.status == 2 ? '下架(通过)':''}}
                                {{service.status == 3 ? '冻结(通过)':''}}
                                {{service.status == 4 ? '新发(通过)':''}}
                            </span>
                </td>
                <td>{{formatDate(service.updateTime)}}</td>
            </tr>

        </template>

    </table>
</div>
</body>
<script>
    function formatDate(time){
        if(time==null) return "";
        return '这里是日期';
    }
</script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            service: {
                totalNumberLeft: 0,
                totalNumberRight: 0,
                id: 41,
                businessTypeIdInDd: 49,
                businessTypeIdInDdName: "产品检测",
                usageId: null,
                usageName: null,
                serviceType_id: 18,
                serviceType_name: "鞋类箱包皮具",
                serviceType_pid: 13,
                serviceType_pname: "轻工产品",
                org_id: 40,
                shopSld: "cect",
                orgAcountName: "远东正大检验",
                org_name_cn: "北京远东正大商品检验有限公司",
                org_name_en: "",
                linkManId: 41,
                linkManName: "admin@远东正大检验",
                orgQQ: "343732967",
                orgServiceType_pid: null,
                orgServiceType_pname: null,
                orgServiceType_id: null,
                orgServiceType_name: null,
                orgitemIds: "1321,1322,1323,1398,1405,1460,1461,1466,1469,1489,1505",
                orgitemNames: "纤维成分含量,耐水色牢度,耐摩擦色牢度,耐汗渍色牢度,耐唾液色牢度,标识标志,偶氮染料,甲醛含量,pH值,外观质量,气味等级",
                title: "作废作废作废作废",
                iconUrl1: "uploadFile/service/40_1428762762718.jpg",
                iconUrl2: null,
                iconUrl3: null,
                intro: "京东指定质检合作机构，ECT远东正大检验-电商品控专家 纺织品检测、皮革箱包鞋类检测、食品茶叶检测 入驻续签京东,质量检测服务 ",
                reportLang: "中文",
                reportMedium: "电子报告",
                reportCycle: "4工作日",
                sampleRequest: "",
                longTextContent: null,
                status: 3,
                checkStatus: 1,
                createTime: 1428762875000,
                checkTime: 1432428698000,
                updateTime: 1472110600000,
                orderNumber: 0,
                serviceScore: 0,
                minPrice: 50,
                maxPrice: 1450,
                popularity: 248,
                salesVolume: 0,
                inspectionCount: 0,
                ddId: null,
                productRange: null,
                standardIds: null,
                applicationIds: null,
                standardModel: null,
                applicationNames: null,
                itemNames: null,
                questionIds: null,
                questionRemark: null
            }
        },
        methods: {
            formatDate: formatDate
        }
    })
</script>
</html>